Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/CommandSender.kt bf929c20f274232e0eb8ddc19b2dc82403e99e5b (bf929c20) Text, 3.75 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository

Tff7b72import T7ee787org.meshtastic.core.model.DataPacket
Tff7b72import T7ee787org.meshtastic.core.model.Position
Tff7b72import T7ee787org.meshtastic.proto.AdminMessage
Tff7b72import T7ee787org.meshtastic.proto.ChannelSet
Tff7b72import T7ee787org.meshtastic.proto.LocalConfig

T8b949e/** Interface for sending commands and packets to the mesh network. */
Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffTooManyFunctionsTa5d6ff"Tb4b4b4)
Tff7b72interface T56d364CommandSender Tb4b4b4{
T8b949e/** Returns the current packet ID. */
Tff7b72fun Td2a8ffgetCurrentPacketIdTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Long

T8b949e/** Returns the cached local configuration. */
Tff7b72fun Td2a8ffgetCachedLocalConfigTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3LocalConfig

T8b949e/** Returns the cached channel set. */
Tff7b72fun Td2a8ffgetCachedChannelSetTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3ChannelSet

T8b949e/** Generates a new unique packet ID. */
Tff7b72fun Td2a8ffgeneratePacketIdTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Int

T8b949e/** Sends a data packet to the mesh. */
Tff7b72suspend Tff7b72fun Td2a8ffsendDataTb4b4b4(Te6edf3pTb4b4b4: Te6edf3DataPacketTb4b4b4)

T8b949e/** Sends an admin message to a specific node. */
Tff7b72suspend Tff7b72fun Td2a8ffsendAdminTb4b4b4(
Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4,
Te6edf3requestIdTb4b4b4: Tffa657Int Tff7b72= Te6edf3generatePacketIdTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3wantResponseTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72falseTb4b4b4,
Te6edf3initFnTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Te6edf3AdminMessageTb4b4b4,
Tb4b4b4)

T8b949e/**
* Sends an admin message and suspends until the radio acknowledges it.
*
* This is used when the caller needs to guarantee a packet has been accepted by the radio before proceeding, such
* as sending a shared contact before the first DM to a node.
*
* @return `true` if the radio accepted the packet, `false` on timeout or failure.
*/
Tff7b72suspend Tff7b72fun Td2a8ffsendAdminAwaitTb4b4b4(
Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4,
Te6edf3requestIdTb4b4b4: Tffa657Int Tff7b72= Te6edf3generatePacketIdTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3wantResponseTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72falseTb4b4b4,
Te6edf3initFnTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Te6edf3AdminMessageTb4b4b4,
Tb4b4b4)Tb4b4b4: Tffa657Boolean

T8b949e/** Sends our current position to the mesh. */
Tff7b72suspend Tff7b72fun Td2a8ffsendPositionTb4b4b4(Te6edf3posTb4b4b4: Te6edf3orgTb4b4b4.Te6edf3meshtasticTb4b4b4.Te6edf3protoTb4b4b4.Te6edf3PositionTb4b4b4, Te6edf3destNumTb4b4b4: Tffa657Int? Tff7b72= Tff7b72nullTb4b4b4, Te6edf3wantResponseTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72falseTb4b4b4)

T8b949e/** Requests the position of a specific node. */
Tff7b72suspend Tff7b72fun Td2a8ffrequestPositionTb4b4b4(Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4, Te6edf3currentPositionTb4b4b4: Te6edf3PositionTb4b4b4)

T8b949e/** Sets a fixed position for a node. */
Tff7b72suspend Tff7b72fun Td2a8ffsetFixedPositionTb4b4b4(Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4, Te6edf3posTb4b4b4: Te6edf3PositionTb4b4b4)

T8b949e/** Requests user info from a specific node. */
Tff7b72suspend Tff7b72fun Td2a8ffrequestUserInfoTb4b4b4(Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4)

T8b949e/** Requests a traceroute to a specific node. */
Tff7b72suspend Tff7b72fun Td2a8ffrequestTracerouteTb4b4b4(Te6edf3requestIdTb4b4b4: Tffa657IntTb4b4b4, Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4)

T8b949e/** Requests telemetry from a specific node. */
Tff7b72suspend Tff7b72fun Td2a8ffrequestTelemetryTb4b4b4(Te6edf3requestIdTb4b4b4: Tffa657IntTb4b4b4, Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4, Te6edf3typeValueTb4b4b4: Tffa657IntTb4b4b4)

T8b949e/** Requests neighbor info from a specific node. */
Tff7b72suspend Tff7b72fun Td2a8ffrequestNeighborInfoTb4b4b4(Te6edf3requestIdTb4b4b4: Tffa657IntTb4b4b4, Te6edf3destNumTb4b4b4: Tffa657IntTb4b4b4)

T8b949e/**
* Sends a lockdown passphrase to authenticate with a locked device.
*
* @param disable when `true`, instructs the device to decrypt storage back to plaintext and leave lockdown (the off
* switch). The device reboots and reconnects reporting `DISABLED`.
*/
Tff7b72fun Td2a8ffsendLockdownPassphraseTb4b4b4(
Te6edf3passphraseTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3bootsTb4b4b4: Tffa657Int Tff7b72= T79c0ff0Tb4b4b4,
Te6edf3hoursTb4b4b4: Tffa657Int Tff7b72= T79c0ff0Tb4b4b4,
Te6edf3maxSessionSecondsTb4b4b4: Tffa657Int Tff7b72= T79c0ff0Tb4b4b4,
Te6edf3disableTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72falseTb4b4b4,
Tb4b4b4)

T8b949e/** Sends a Lock Now command to immediately lock a locked-firmware device. */
Tff7b72fun Td2a8ffsendLockNowTb4b4b4(Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.06s